package com.wanxi.springboot.team.manage.system.service;

import com.wanxi.springboot.team.manage.system.api.CommonResult;
import com.wanxi.springboot.team.manage.system.model.Role;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 蒋帆
 * @since 2020-12-21
 */
public interface RoleService extends IService<Role> {
    /**
     * 用户添加
     * @param role
     * @return
     */
    CommonResult addRole(Role role);

    /**
     * 获得所有角色并展示在页面
     * @param page
     * @param limit
     * @return
     */
    CommonResult getRoles(Integer page, Integer limit);

    CommonResult updateRole(Role role);

    CommonResult deleteRole(Integer id);

    CommonResult getRoleByUserId(Integer userId);

    CommonResult getRoleList();
}
